-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI: Make runners configurable #840
Conversation
<%- else -%> | ||
uses: voxpupuli/gha-puppet/.github/workflows/basic.yml@v1 | ||
<%- if @configs.key?('rubocop') || !@configs['additional_packages'].empty? -%> | ||
<%- if @configs.key?('rubocop') || !@configs['additional_packages'].empty? || @configs.key?('unit_runs_on') -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder at which point we're just going to write it in Ruby and use to_yaml
on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've had the same thought. One of the issues with using psych to format is you can't control the indenting of lists and it always uses the non-indented form (which I find harder read). There's also no support for emitting comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a better featured yaml parser/generator we could use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes, ruby/psych#594 is still unresolved :(
unit_runs_on: '<%= @configs['unit_runs_on'] %>' | ||
<%- end -%> | ||
<%- if @configs['acceptance_runs_on'] -%> | ||
acceptance_runs_on: '<%= @configs['acceptance_runs_on'] %>' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have been using larger runners in my control repo but I use a nested hash for the config. E.g.:
rake_checks:
runs-on:
group: Default Larger Runners
labels: ubuntu-latest-16-cores
I guess that could be done as a heredoc but the indenting would be fiddly.
Co-authored-by: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
I'm going to merge this since it works. If someone has concrete ideas on how to improve it or want to rewrite it, let me know :) |
Tested in voxpupuli/puppet-nginx#1562